package com.fadadianqi.mall.dao;


import com.fadadianqi.commons.BaseDAO;
import com.fadadianqi.mall.model.Nav;

import java.util.List;

public interface NavDAO extends BaseDAO<Nav> {

    /**
     * 给当前层次的导航按钮排序都+1
     *
     * @param order
     */
    void updateOrderForLayer(Nav order);

    List<Nav> findRootItems();

    List<Nav> findChildrenByParent(Nav parent);

    List<Nav> findAll();

    Nav findUpperNav(String parentId, int orderby);

    Nav findLowerNav(String parentId, int orderby);

    List<Nav> findNavByLayer(int layer);

}
